home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(active)
- {
- xdif = targetx - _X;
- _X = _X + xdif / 10;
- ydif = targety - _Y;
- _Y = _Y + ydif / 10;
- if(Math.abs(xdif) < 0.2 && Math.abs(ydif) < 0.2)
- {
- _X = targetx;
- _Y = targety;
- active = false;
- }
- this.onMouseDown = function()
- {
- if(_global.die == false)
- {
- _parent.shot1._x = this._x;
- _parent.shot1._y = this._y;
- _parent.shot1.gotoAndPlay(2);
- _parent.sht.gotoAndPlay(1);
- _global.mojo -= 2;
- }
- };
- }
- }
-